package com.bookshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bookshop.entity.Permission;
import com.bookshop.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author g2l
 * @since 2024-01-13
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    public List<Permission> selectPermissions(@Param("phoneNumber") String phoneNumber);

    int getCartInfo(@Param("userId") int userId);

    int getFavoritesInfo(@Param("userId") int userId);

    int getPayInfo(@Param("userId") int userId , @Param("payStatus") int payStatus);

    int getUnPayInfo(@Param("userId") int userId , @Param("payStatus") int payStatus);

    int getOutTimeInfo(@Param("userId") int userId , @Param("payStatus") int payStatus);

    String getUserPicture(@Param("userId") int userId);


}
